Convert code to ES6 modules

Opening PR to track the final stages of this project:

- [x] Verify all fields exposed by the globals object
- [x] Note possibly breaking changes
- [x] Verify dist artifact output