Andy Murray battled past thirteenth seed, Matteo Berrettini in five sets to reach the second round of the Australian Open.