RSA: fix error when exponent isn't co-prime to lcm