Fix pickling error with AsyncResult