FIX dispatchEvent: call eventHandler in context of the WebSocket

small fix in function dispatchEvent():
call the event handlers in context of the WebSocket instance (instead of global/window context)