use main-name for named-amd and global builds

currently only `cjs` and `amd` builds get the the name from the `main` option

with this PR the same happens for the `globals` and the `named-amd` dists

@rpflorence let me know what you think and thanks a lot for all your work!