fix compile on non-clang
slightly cleaner version detection