build: fix __builtin_expect detection for clang

Using AC_CHECK_DECL, the generated test tries to cast the function to void.
Clang doesn't allow that for builtins.