Macedonia's foreign minister says his country may follow Hungary's example and build a border fence, to stem the influx of refugees through the Balkans.