Fixes a bug that causes HTTPS to never be used.

Fixes a bug that causes HTTPS to never be used. Without using the HttpAgent version of KeepAliveAgent the connections always default to http instead of https, even when https is specified as the protocol.