Fixes to allow runnin on django 1.3 and mysql