fix dynamic library names for template haskell