leak-detective: Fix compile warning due to unused variable if LD is disabled