Compatibility layer for older versions of the stm library.
Namely, we define tryReadTMVar which stm-X.X.X lacks. This
module uses Cabal-style CPP macros in order to use the package
versions when available. This isn't actually used by the stm-chans
package, but we provide it anyways since we provide compatibility
layers for TVar and TChan.

Other capabilities

Notice that the boolean value returned is just a snapshot of
the state of the TMVar. By the time you get to react on its result,
the TMVar may have been filled (or emptied) - so be extremely
careful when using this operation. Use tryTakeTMVar instead if possible.