Ex-commander: US losing ground against Islamic extremism