JavaScript utility for creating namespaces