Fix hanging blocking TLS connections with OpenSSL