detect for setImmediate and use that if available