leak-detective: override malloc functions instead of using deprecated hooks