Replaced setImmediate

node 0.8 does not seem to have setImmediate. Use process.nextTick instead.