Fix to issue #362: Error is not caught if WebSocket constructor throws SecurityException