Fix import to handle Django version earlier than 1.7

This addresses issue #3