Revert parts of r223594. Use DYLD_LIBRARY_PATH on OSX when running tests.