transports: fix WebSocket transport in the web browser