Fix #57. Update UMD. Always export new sync() function.

Fixes #57:
- Uses [this UMD pattern](https://github.com/umdjs/umd/blob/master/returnExports.js)
- Exports: ``{ sync: sync, debugLog: debugLog};``