Somalia agrees to talks with Islamists