Quantization of gyroscopically stable systems with indefinite Hamiltonian