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

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