Somali PM says war with Islamists may be 'inevitable'