fix async test in phantomjs