OpenSSL BN_mod_inverse performance is bad