Add `hacks_for_phantomjs()` method for `release-0.12.0` branch.

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