Fixes a bug that causes the client to never use HTTPS, even when ‘https’ is specified as the protocol.

The issue is that without specifying the HttpsAgent, the default HTTP keep alive agent is used, and this agent does not use secure sockets.