fix ssl sockets to work cleanly with httplib