A late equaliser for Hungary denied Portugal an early World Cup berth even as Cristiano Ronaldo became the top scorer in qualifiers history with 41 goals.