Add memory leak detection on debug builds