Fix compilation without deprecated OpenSSL APIs