Add copy() and deepcopy() support.