How an EU-funded agency is working to keep migrants from reaching Europe