[fix] Add safety check for global object
[fix] Add safety check for global object

Closes #71

socketio/engine.io-parser,Rainforce15/engine.io-parser,socketio/engine.io-parser,Nibbler999/engine.io-parser,darrachequesne/engine.io-parser,socketio/engine.io-parser,Automattic/engine.io-parser