Fix issues with md5 in Django 1.6