fix crash in ssl connection

Fixes https://github.com/mikeal/forever-agent/issues/3