Turkey agrees to allow U.S. military to use its base to attack Islamic State