Patch #1550800: make exec a function.
diff --git a/Lib/ihooks.py b/Lib/ihooks.py
index f5b93ab..eef3474 100644
--- a/Lib/ihooks.py
+++ b/Lib/ihooks.py
@@ -323,7 +323,7 @@
             m.__path__ = path
         m.__file__ = filename
         try:
-            exec code in m.__dict__
+            exec(code, m.__dict__)
         except:
             d = self.hooks.modules_dict()
             if name in d: