Frequency measurements of the gyrotrons used for collective Thomson scattering diagnostics at TEXTOR and ASDEX upgrade