closes the phantomjs process, when the node terminates