President Trump said "numerous perfect strikes" had hit Islamic State militants in the West African nation of Nigeria.