modify some stuff to adapter lower version cmake & g++