Fix module undefined warnings in non-commonjs/node environments while keeping jslint happy