Workaround for sockjs/sockjs-client#79

I was reluctant to make a pull request for this, since it's a workaround for a sockjs bug, but @3rd-Eden requested that I do :)

See sockjs/sockjs-client#79 for details