Fix OS X builds

This fixes the client build on OS X.

Reference: #6256 homebrew/homebrew#29961

This seems like a total hack and I would love direction on how to fix this in a better way. I'm am open to feedback and suggestions.