Pass appropriate -L flags pointing out to the LLVM library directory
when linking tests. This is necessary on platforms that default to
libc++ but don't ship with one, e.g. on NetBSD buildbot.
Additionally, pass -Wl,-rpath on NetBSD. LD_LIBRARY_PATH does not seem
to work for all the test cases.
This patch includes -L&-Wl,-rpath passing for tests using clang
via toolchain substitutions, via build.py and via Makefiles. This is
not pretty. I'm open to better solutions.