configure: Improve check for built-in __atomic_* functions