widl: Use type_get_type to determine the types of types during typelib generation.