Update WebSocket.js

Fixed issue https://github.com/einaros/ws/issues/246.

The occurred error with reason "invalid error code" crashes program execution. This patch helps to fix this problem.
Merge branch 'master' of https://github.com/seelnolu/ws