fix error when complie with g++