Optimize require.js modules if build.js file is present