Replace access to OpenSSL SSL internals by accessor function. Internals are no longer available for OpenSSL master. Not tested, waiting for GUMP. Backport of 1669302 from trunk.