because globals suck :(

I had a bit of a trouble today when I tried to run async in an env where the root wasn't the window.