Frequency measurement of a submillimeter wave gyrotron output