Improve fake.ml (on top of rgrinberg's changes)

At the beginning are two small 3.12-compatibility commits (the second being made pointless by further changes of mine). I have no opinion on whether you should support 3.12, but I happened to be using a 3.12 machine today, and given that the changes are really small and don't make the code much uglier I think there is little reason not to. (That doesn't mean you need to keep 3.12 compat. in the future, but I'd rather break it for a good reason.)