fix compilation breakage for VS2008 and 64-bit (fixes issue 2558)