add compatibility for twisted >= 11.1.0 onwards (no backwards compatibility!)