Win32fixes

Here are fixes for a couple of build errors that came up when I tried to compile on Win32 with VS2013 (VC12)