BLD: Fixes for building on win32 with MSVC 2008

Some of the recent merges have introduced build failures on windows. This gets it building again.