js oop and inheritance with require.js