setImmediate workaround for older node.js versions