Fix lightbox templatetag error on non-wagtail pages