Novak Djokovic lost a rare set in the Australian Open first round but advanced.