unit-tests: support testing when leak-detective has not been enabled