PhantomJS doesn't have Function.prototype.bind - added polyfill