Deniz Undav came off the bench to score twice, including a 94th-minute winner, as Germany beat Ivory Coast 2-1 in Toronto to reach the 2026 World Cup knockout phase.