Fixed GetItemList grad to support old scipy version.