implemented UMD pattern to share browser/node

Implemented the UMD pattern (see
http://know.cujojs.com/tutorials/modules/authoring-umd-modules) so that
canto3 can be used both in the browser and in node.