put LD_LIBRARY_PATH in try/except loop for osx.