Fixed compilation flags for gcc and clang