Fix build when template haskell disabled