The two North African nations become the first teams from the continent to qualify for next year's World Cup in Brazil.