javascript: module pattern - prototype