--- a/OpenEXR/IlmImf/ImfSimd.h.orig	2013-11-25 23:49:53.000000000 +0400
+++ b/OpenEXR/IlmImf/ImfSimd.h	2013-12-28 11:32:14.071000000 +0400
@@ -44,8 +44,10 @@
 
 
 // GCC and Visual Studio SSE2 compiler flags
-#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
+#ifndef __MINGW64_VERSION_MAJOR
+  #if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
     #define IMF_HAVE_SSE2 1
+  #endif
 #endif
 
 
