Make router.js call afterRender even in legacy router