Set `main` in case the root (i.e. the module without any parent) doesn't have any sub-modules

I encountered an error complaining `main` wasn't defined around line 8 in the output file where:

    function exports(){ return main(); };

... in the constructor. I figured that the top-most module wasn't called with `module()` due to the lack of `modules` in:

    app.pkg(function(parents){

      return {
        'name'         : 'app',
        'mainModuleId' : '',
        'modules'      : [],
        'parents'      : parents
      };

    })({  });


I don't know whether there's another way but this works for me.