Add `hacks_for_phantomjs()` method for `master` branch.

Hi @aronasorman - here's the PR for adding the `hacks_for_phantomjs()` method on `master` branch.