Bug 1000172 - Prevent scripts defining global from being removed during the optimization

https://bugzilla.mozilla.org/show_bug.cgi?id=1000172