msvc: Fix a compiler warning due to an incorrect pointer cast