fix compilation without deprecated OpenSSL APIs