Bring back global app namespace assignment

References #2058 

This PR brings back the global `window.AppName` assignment to provide access to `__container__` and such