Add workaround for Cython

Thanks to C Blake.
No tests because I don't know how to do it with little effort.