Avoid a NameError when OpenSSL is unavailable.

Fixes #2893.