use setImmediate rather than process.nextTick if available

mjijackson/bufferedstream#6

Node 0.10 changes process.nextTick to occur before IO so
we should use its setImmediate instead, but to make this
backward compatible, check for the existence of setImmediate
and use it otherwise fallback to process.nextTick on older
versions of Node.