fixes for latest node and phantomjs