[GHC] #7700: iOS patch no 3: enable/disable terminfo more precisely by os