Add Function.prototype.bind support with a polyfill

Stolen from https://github.com/ariya/phantomjs/pull/11225/files