Minor changes to allow compilation with clang