various fixes for requirejs working with build process