Add thrift mode from thrift/contrib