build system cleanup and msvc x64 auto-detection