fix compiling error of cpp-tests on linux