Fixes #19: protocol switching from HTTPS to HTTP results in OpenSSL error.