Node.js and browser AMD or global module to assist extending objects and overriding methods