Algorithm 736: Hyperelliptic integrals and the surface measure of ellipsoids