Fix generation of main index.js file.