Fixing leaks in nssrs and tests dependencies.
Fixing ld_library_path to load cmocka.