UN urges governments to agree to 'legal' channels of migration