Allow providing extra headers in the handshake request

I was trying to test a socket.io server with the socket.io-client module when I wanted to provide some extra headers in the handshake request (for authentication).  The attached change worked for my situation.