Support building under clang, and other small Makefile tweaks