Build and test fixes for g++/clang on Linux