Fix #481: use a safe recompilation check when Template Haskell is