U.S. training helped mold top Islamic State military commander