changes for compatibility w/ ubuntu 14.04 and django 1.6