Change the way classes are registerd to Kryo