Here's a quote from Upward and Davidson 2011:
"Voicing of intervocalic /s/ to /z/, written s or ss, after an unstressed syllable in words such as desist, resist (compare the pronunciation of consist, insist), dessert, possess occurred in EModE, at first with both voiced and voiceless forms co-existing" (p. 189).
EModE stands for Early Modern English, i.e. c. 1476- c.1660 (Ibid, p. xiv), so in the much later French borrowings it was not operational e.g. in cassette (its first attested use in the OED goes back only to 1793 meaning 'casket').
Cf. Minkova 2014 (the online companion to her 2014 textbook, A historical phonology of English):
“Lack of stress and possibly ambisyllabic status will account for the voicing of [s] in the early Modern English voicing in French and Latin loans such as possess, dessert, dissolve, where the conditions of voicing replicate Verner’s Law (see 3.4.1). The prefix dis- was commonly voiced prevocalically in the eighteenth century – disarm, dishonour, disorder – but only disaster and disease maintain the voicing” (p. 24).
In the above-mentioned 2014 textbook she describes this change as
“a sixteenth-century tendency to voice fricatives after unstressed syllables, manifested in the voicing of /s/ to /z/ in loanwords, mostly, but not exclusively after prefixes – resign, transact, example, Alexander – and even against the spelling in possess, dessert, dissolve” (p. 66).
A note re: pronunciation of French example, exact etc.:
Obviously, the English words example and exact were borrowed a while ago, the first attested uses listed in the OED are
- exacte (1533, T. More “Suche exacte cyrcumspeccion”) – borrowed from Latin, cf. the first attested use of exact, -e in French is ca. 1542 (Dictionnaire historique de la langue francaise);
- exsaumple (ca1382, “Bi this exsaumple [Latin hoc exemplo]” – borrowed from French. In Middle English there was a lot of variation, so we can also find such forms as exsample, exsaumpyll, exsaunpyll, exsawmple, exsaumple – which means those were pronounced with [ks].
It’s important to note that Latin ex- changed in Old French to either ss (before a vowel) or s (before a consonant), see Zink 2013: 233. So we have
Latin exagium > French essai
Latin extendere > French étendre (cf. Old French estendre)
Whenever you see a French word beginning with ex-, it means it was either much later borrowed from Latin (like exact, -e ca. 1542) or its spelling was changed during the so called Erasmian reform (like exemple).
Latin exemplum > Old French es(s)ample, essemple
Note: Kibler 1984 “x in Latin represented the combination /k+s/; it may represent the same sound in Old French” (except in the word-final position where it stood for -us, p. 19)
Pierre Fouché in the third volume of his Phonétique historique du français (v. III Les consonnes et index général) mentions that in the sixteenth century, we encounter such forms in French as ezemple, euzemple, ezerice, euzecuter – which means those were pronounced with [z] (not [gz]!) in Middle French and up until the sixteenth century. Then during the Erasmian reform the kind of pronunciation closer to Latin was "restored" in such French words, cf.
« Il est vrai qu'à côté de egzemple, on a prononcé aussi eksemple. Cette prononciation était encore en usage du temps de Vaugelas (1647) qui la condamne d'ailleurs. Elle correspond à une prononciation plus savante du latin (=eksemplum), celle qui a été indiquée plus haut résultant d'un compromis avec la prononciation ancienne soit du français, soit du latin lui-même » (p. 874).