Add `hacks_for_phantomjs()` method for `nalanda-rct2` branch.

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