[Git][ghc/ghc][wip/jeltsch/base-buildable-with-ghc-9-14] Add `hGetNewlineMode` for GHC 9.14