Broken compile fixes

Hi, I ran into multiple issues compiling and running heap-shot on Windows x64 using VS2012.  I got it working and would like to contribute these changes back upstream.