Fix compatibility issues with Django<1.5
Add a Makefile for convenience