Fix build warnings on MSVC x64 and OS X clang