Changed global scope from window to a more broader top-level 'this' (unless it is already defined - like with Node.js).