Fixed library link order problem on linux
Add LD_LIBRARY_PATH stuff for running tests on travis