Avoid hardcoding compiler/flags

Ref. https://github.com/Homebrew/homebrew/pull/28443.