feat(transpiler): adds options for global mode and variable name

This commit is a continuation of a223a0bc20d0070c48c9dd037d5b2b17c0fe0346
for the transpiler. It adds support for the following two options in the
transpiler:
* mode: either `"commonJS"` (default) or `"global"`, determines whether
the transpiler adds the call to require at the beginning of the transpiled
file or not
* setVarName: defaults to `"$set"`, determines the name of the variable
pointing to the `$set` module

When calling the compiler, the options object is passed directly to the
transpiler, so that the existing `mode` option of the compiler is reused
in the transpiler.

close #246

Closes #246