LDLIBRARY path fix for osx

osx appears to need this fix to its library path. (this was also part of my previous pull request, but it is useful on its own)