fix version function for Django 1.5