added check for setImmediate for use on client side
added polyfill for setImmediate in browser
0.5.2