fixed attribute lookup error with old style classes

--HG--
branch : trunk
diff --git a/jinja2/environment.py b/jinja2/environment.py
index 689bc92..cf95060 100644
--- a/jinja2/environment.py
+++ b/jinja2/environment.py
@@ -313,7 +313,7 @@
             pass
         try:
             return obj[attribute]
-        except (TypeError, LookupError):
+        except (TypeError, LookupError, AttributeError):
             return self.undefined(obj=obj, name=attribute)
 
     def parse(self, source, name=None, filename=None):