Try to fix the poltergeist tests by waiting for all AJAX requests to finish.