Global convergence of gradient descent for phase retrieval