Added WebSocket detection based on userAgent.
Adding window.WebSocket check #28