Allow a custom global scope

Defaults to `window