core: fix portability with g++/clang++