Wrap the tests that leak memory in a flag so valgrind runs clean

Currenly BLAS and libdl ( all modules :-( )