WebSocket: fix JSHint issues