Support mocha-phantomjs test environments.

This modifies the teamcity reporter to check whether a phantomjs environment is present and, if so, behave in a way that's compatible with `mocha-phantomjs`. This means reporters [can only require other reporters and should use process.stdout.write to report progress][1].

If execution is in a Node environment, the previous behaviour is unchanged.

[1]: https://github.com/metaskills/mocha-phantomjs#third-party-reporters