Al Ain ensured they did not leave the Club World Cup winless as they fought back to beat Wydad Casablanca.