Add compat module to handle Django >= 1.3. Closes #1.