Use threadsafe OpenSSL error functions