Fixes for building/linking with Clang