Fix JSONKit serialization to accept subclasses of the basic types.