Support Django legacy db backends and 1.4+ transparently

Fixes #136