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
Merge pull request #7 from strongloop/fix/browser

Fix support for browsers