Fix build for older ghc (tryReadMVar not available there).