fixes for Cython 0.21. Closes #131