HTML5 WebSocket compatibility for onmessage event.