Fix MSVC compiler warning.

Make typecast explicit.