Fix r.js optimization issue when lazy loading