fix build issue with clang

pull request for https://github.com/Homebrew/homebrew/issues/31398 
I will add link to upstream now