improved testing with PhantomJS by adding support for Function.bind