fix compilation in Cython 0.21
fix pow() special case in Py2.x