add support for new and old openssl API

support RSA_generate_key_ex _and_ RSA_generate_key_ex.
If both are available, RSA_generate_key_ex (newer) is chosen.