Fix for issues #12 and #15

This pull request fixes compatibility with Mac OSX Mavericks as well as removing usage of the now deprecated httpConnectEncrypt.