crypto/bn: fix return value in BN_generate_prime