See also #2091171: Create a sub-module which allows mocking of the user agent.

We must allow the path to PhantomJS to be non-hard-coded. Waiting for a response to #2097753: How to pass configuration settings to simpletest?