Fix compiler warnings from Visual C++