Improve attribute detection for Apple clang