What factors contributed to the spread of islam in africa