Generate the overrides rather than relying on monkey patching. Fixes #23