Fix setImmediate detection