Fixed a memory leak in heapdump.cc on Windows & use preprocessor checks to ensure backwards compatibility to node v0.10.24.