Support for Cabal 1.17.0 and greater

Because writeFileAtomic use ByteString instead of string in new Cabal