Add some level of compatibility with python3.2/Django1.5

Added some level of compatibility with Python3.2 and Django 1.5.
Tested within django-comments-xtd under:
* Python 2.7 and Django 1.4.5
* Python 2.7 and Django 1.5.1
* Python 3.2 and Django 1.5.1