fix build issue with clang

pull request for https://github.com/Homebrew/homebrew/issues/31398