Fixed SOCKS5 handshake after py2.6 changes