Evaluation of standoff distance method to determine the coronal magnetic field using CME-driven shocks