Fixups for compiling on Windows 7