replacing firefox with phatomjs as a headless browser