Replace gcd algorithm with a known good one.