Fix the tests to respect LD_LIBRARY_PATH

Fixes #78.