scanner: Improve compatibility with OS X

While gobject-introspection works on OS X, a few circumstances are
handled a little different there. For one, libraries are linked using
absolute paths. The current gobject-introspection code however strips
any path components and just uses the filename in the .gir file –
while this doesn't cause failure, the generated typlibs will only work
in presence of a correctly set DYLD_LIBRARY_PATH or
DYLD_FALLBACK_LIBRARY_PATH environment variable.

Setting DYLD_LIBRARY_PATH on OS X often is a bad idea due to the
side-effects: Doing so causes the directory parts of libraries
referenced using an absolute path to be ignored if there is a equally
named file in the directory listed in $DYLD_LIBRARY_PATH, possibly
overriding referenced system libraries with incompatible versions.

Setting DYLD_FALLBACK_LIBRARY_PATH is the better solution for this
problem; however because this variable has an implicit default value
it's not simple to do so correctly.

The best solution to the problem is referencing libraries from .girs
using absolute paths, just as all other binaries on OS X. The attached
patches against 2.38.0 implement that.

Another quirk one needs to be aware of on OS X is that Apple ships a
program called libtool, which is not GNU libtool and incompatible with
it. GNU libtool, if present, is usually called glibtool on OS X. The
patches also fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=709583