changes to compile with g++