BLD: Fixes for building on win32 with MSVC 2008
Merge pull request #3333 from mwiebe/win32_compile

BLD: Fixes for building on win32 with MSVC 2008