I setup global namespaces for my objects by explicitly setting a property on window.
window
window.MyNamespace = window.MyNamespace || {};
To keep it dynamic, just use:
(window).MyNamespace