Fixing thrift build issues