Make hooks and image formats importing work with Django 1.7 AppConfigs

This also fixes #398