Make asap work in browsers as well as node.

I found I needed this change to use asap in Chrome.