Fixed build for gcc and clang