fix g++ build