Fix thrift encoder: s/factory=/new=/