Measuring the black hole masses of high-redshift quasars