// WebAPIException and WebAPIError definition moved to src/utils/utils_api.js
// for compliance reasons. You can find more info there.
+var _global = {};
+if (typeof window != 'undefined') {
+ _global = window;
+}
+else if (typeof global != 'undefiend') {
+ _global = global;
+}
+
/**
* Filter match flags.
exports.SimpleCoordinates.prototype.constructor = exports.SimpleCoordinates;
// Protect JSON.stringify from being overriden by application
-Object.defineProperty( window, 'JSON', {value:JSON, writable:false, configurable:false} );
+Object.defineProperty( _global, 'JSON', {value:JSON, writable:false, configurable:false} );
Object.defineProperty( JSON, 'stringify', {value:JSON.stringify, writable:false, configurable:false} );