Fix mem leak detection enabled build.