Add copy method for Kryo serializer