support use_cloudpickle in addition to use_dill