Terrorism abroad and migration policies at home