Added option to add headers to phantomjs, and added a test for it.