Gruntfile: fix watch task
exports/global: Do not attach global variables for most CommonJS environments

For CommonJS environments where the global already has a document, it is expected
that if a global is needed, the user can attach the global.

Fixes #14645.