Prevent various redefined definitions in win32-specific code

From: Erik van Pienbroek <epienbro@fedoraproject.org>
Date: Mon, 22 Dec 2014 18:02:09 +0100