Add `hacks_for_phantomjs()` method.
Merge pull request #2373 from mrpau/hotfix/add_phantomjs_hacks

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