JavaScript: How to make immutable/Singleton object