Make code compile with g++