Use the new interface to RSA_generate_key if available

Some libssls, namely the one you can get precompiled for
Android, comes without any deprecated interfaces, and
thhose include RSA_generate_key; this stops the
module from working.

This commit makes the module use the new interface if
on a recent version of libssl.