Add exports to the core modules.

If CommonJS is in use, we should export the classes for use with
a node application.