Geometric quantization of Riemann ellipsoids