EU's historic migration pact passes amidst divisions and far