graphics: fix cython 0.20 compilation. closes #1796