Fix deprecation warnings with transformers < 4

My fix for issue #1. This uses CPP pragmas to conditionally use the deprecated `ErrorT` (if using an old version of `transformers`) or `ExceptT` (if using a recent version). This way, the version bounds for `transformers` do not have to be changed, and the deprecation errors should go away.