An inverse problem for the wave equation with first order perturbation