backport fix for mxcl/homebrew#21259 to gmp4