Augmenting an object's prototype using module pattern