Made TH optional
Merge pull request #30 from albertov/master

Make use of Template Haskell optional