MSVC leak detection changes.

Just the first one in main.cpp, seems like a logical place.