Fix some compiler warnings on MSVC