As ISIS Loses Land, It Gains Ground in Overseas Terror