Safely resolve `ws` module.
Safely resolve `ws` module.

After changing the `ws` dependency to be ignored, not exluded, by https://github.com/socketio/engine.io-client/pull/451 if the target runtime does not provide a `ws` module an error is throw. This is the case with NativeScript which currently does not have a WebSocket implementation. The change is using safe resolution with try-catch preseving the old behavior in a controlled manner.

socketio/engine.io-client,socketio/engine.io-client,nkzawa/engine.io-client,socketio/engine.io-client,Automattic/engine.io-client