Link Windows DLLs and OSX dylibs correctly in linkDynLib