Use setImmediate to avoid stack overflow on 0.10

(I think this is the right place)