The U.S. military said on Tuesday that it had carried out two airstrikes in Somalia that killed 37 suspected militants.