update tests to use global phantomjs if available