fix timing of when app.on('model') gets emitted in browser so that model functions can be defined