Fix build options for memory leak detector