Only enable malloc hook when compiling using gcc.