Application of weighted homotopy analysis method to solve an inverse source problem for wave equation