Experimental measurements of competition between fundamental and second harmonic emission in a quasi-optical gyrotron