Fixed compilation flags for g++