Fixed a few bugs in is_prime_lenstra.