compat: Add support for 3.12