Fix Mac OSX ld support by detecting whether to use -Wl,-R or -Wl,-rpath, fixing issue #19.