Fixed dynamic library id on Mac after installation

Allows non-standard install locations (eg. not /usr/local) on Mac OS X.