EU Leaders Agree to Take In 40,000 Migrants