update build script for thrift protocol