fix for randomIvalInteger, ghc #8898