Fix bn_gcd code to check return value when calling BN_one()