make clang version checking more robust; fixes #3011