build: osx: attempt to work with homebrew keg-only packages

@gavinandresen Could you please give this a try? I'm not sure what's different about your setup, but I'd like to be sure it works in your case before merging.
Please be sure that 'make check' works as well, to verify that the correct runtime path is embedded.