Trying to make polyglot.Util.TypeEncoder more extensible to support
Fabric implementation.