[C++] fix GCC compiling issue.