Lawmakers in Poland have approved a proposal to build a barrier on its border with Belarus in attempt to reduce the flow of migrants using the route to enter the EU.