Allow building with Microsoft Visual C++ Compiler and fix an uninitialized variable