Replace clang check with ax_check_compile_flags for -Wno-deprecated-register