Adjusted ToJSON/FromJSON instances for aeson >= 0.6.2.

aeson 0.6.2 changed its default method of deriving ToJSON/FromJSON
instances for generics.  Instead of {"Str": "hi"}, the inline
element Str "hi" was becoming {"tag": "Str", "contents": "hi"}.
This change causes problems for the python pandocfilters module.

This patch uses CPP macros to ensure that the JSON instances work
the same regardless of what version of aeson is used.
({"Str": "hi"}).
Version bump to 1.12.2.