fix socket connect when using proxy
Merge pull request #56 from w3c/denis/proxy-socketio

Suite of tests pass, communication through the socket still works (tested with localhost only).