make compile work for both clang and gcc