Two fixes

This fixes a problem in the type signature for `decodeByName` and also generalizes the dependencies so that this compiles with older Haskell Platforms.