Allow deserialization of polymorphic classes by class without specifying the type