diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c
index 9b951429f872b9f89b0d8b58163a022ae86d39a0..4cae148f9f3d14b96495f6a315f3f6aec5bba1f2 100644
--- a/src/sdl/i_main.c
+++ b/src/sdl/i_main.c
@@ -152,11 +152,16 @@ int main(int argc, char **argv)
 			// XP and Vista users can't use the newest exchndl.dll
 			// and older exchndl.dll won't work with release builds >= 2.1.21
 			// Check for >= Version 6.1 (>= Win7)
+#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
+			if (IsWindows7OrGreater())
+				LoadLibraryA("exchndl.dll");
+#else
 			DWORD winversion = GetVersion();
 			DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
 			DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
 			if (major > 6 || (major == 6 && minor > 0))
 				LoadLibraryA("exchndl.dll");
+#endif
 		}
 	}
 #ifndef __MINGW32__
diff --git a/src/sdl12/i_main.c b/src/sdl12/i_main.c
index 6494564d4b511043d13b13a2dac9b8cddfdfaf82..219c65213e553a68c80012430b72c659c63189b1 100644
--- a/src/sdl12/i_main.c
+++ b/src/sdl12/i_main.c
@@ -221,11 +221,16 @@ int main(int argc, char **argv)
 			// XP and Vista users can't use the newest exchndl.dll
 			// and older exchndl.dll won't work with release builds >= 2.1.21
 			// Check for >= Version 6.1 (>= Win7)
+#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
+			if (IsWindows7OrGreater())
+				LoadLibraryA("exchndl.dll");
+#else
 			DWORD winversion = GetVersion();
 			DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
 			DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
 			if (major > 6 || (major == 6 && minor > 0))
 				LoadLibraryA("exchndl.dll");
+#endif
 		}
 	}
 #endif
diff --git a/src/win32/win_main.c b/src/win32/win_main.c
index 3da9e89ae6f0d10090b56e0990cdde3bf5b78c48..06c17fe3fd195e426d5a00be39db240b4ca42688 100644
--- a/src/win32/win_main.c
+++ b/src/win32/win_main.c
@@ -668,11 +668,16 @@ int WINAPI WinMain (HINSTANCE hInstance,
 			// XP and Vista users can't use the newest exchndl.dll
 			// and older exchndl.dll won't work with release builds >= 2.1.21
 			// Check for >= Version 6.1 (Win7)
+#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
+			if (IsWindows7OrGreater())
+				LoadLibraryA("exchndl.dll");
+#else
 			DWORD winversion = GetVersion();
 			DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
 			DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
 			if (major > 6 || (major == 6 && minor > 0))
 				LoadLibraryA("exchndl.dll");
+#endif
 #if 0
 		}
 #endif