Fixed some MSVC specific warnings

Fixed some MSVC warnings when compiling a DLL.
I confirmed that it won't break the existing DLL exports despite the fact that it modifies the public header.