userpref: Use RSA_generate_key_ex() in favor of deprecated RSA_generate_key()

The RSA_generate_key function has been deprecated in OpenSSL
in favour of the newer function RSA_generate_key_ex.

RSA_generate_key_ex with its current interface has been
part of OpenSSL starting from version 0.9.8 (July 2005).