Fixed wrong variable name and spurious curly bracked on Windows.
Only enable malloc hook when compiling using gcc.
"InterlockedAdd" is only available on the 64bit compiler for Windows, use "InterlockedExchangeAdd" for 32bit.
Merge remote-tracking branch 'origin/master' into prerelease-0.4