diff --git a/engine/client/image.c b/engine/client/image.c
index 1a3282ab0..972f9e42a 100644
--- a/engine/client/image.c
+++ b/engine/client/image.c
@@ -17,7 +17,6 @@ cvar_t r_dodgypcxfiles = SCVAR("r_dodgypcxfiles", "0");	//Quake 2's PCX loading
 													//and some Q2 mods include PCX files
 													//that only work with this assumption
 
-#define GLOBAL(x) x
 #ifndef _WIN32
 #include <unistd.h>
 #endif
@@ -875,6 +874,8 @@ term_source (j_decompress_ptr cinfo)
 }
 
 
+#undef GLOBAL
+#define GLOBAL(x) x
 
 GLOBAL(void)
 jpeg_mem_src (j_decompress_ptr cinfo, qbyte * infile, int maxlen)