OpenSSL: avoid using now-deprecated routines on newer versions