The Philippines military says 18 soldiers have been killed in fierce fighting with Islamist militants in the south of the country.