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.  
Merge pull request #221 from ashnur/patch-1

because globals suck :(