fix error passing options to browser websocket constructor