U.S. courts restrict migrant detention