A cross-browser implementation of the new setImmediate API.