Adjusted if condition for installing phantomjs