Number four seed Alexander Zverev almost squandered a two-set lead in the second round of the Australian Open.