avoid a bug of (maxBound :: Word) on 32-bit platform

Details:
* #8072 (Optimizations change result of div for Word) - GHC
  <https://ghc.haskell.org/trac/ghc/ticket/8072>
* Changeset af77ef4 in base
  <https://ghc.haskell.org/trac/ghc/changeset/af77ef45d576fddb25acf28beb434ef431f430a0/base>