Fix openssl lock destruction.