Improve libintl detection and linking.

This makes it so that a self-installed libintl is now detected and used.
It also attempts to locate a homebrew version of the library, if that
exists.