Fixed wrong variable name and spurious curly bracked on Windows.
Only enable malloc hook when compiling using gcc.