Add pusher fixes

Cherry-picked some commits from https://github.com/pusher/sockjs-client/commits/dev