The leader of the Islamic State militant group that controls parts of Syria and Iraq has accepted a pledge of allegiance from Nigerian Islamists Boko Haram, his spokesman said in an audio message transmitted on Thursday.