Avoid process.nextTick in node.js > 0.10 and browsers.