Fix support for browsers

Use `process.nextTick` instead of `setImmediate`, as the latter is
not a standard API.

https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate

/to @kraman please review
/cc @ritch