add gflags support