Detect presence of wagtail_hooks modules before importing