python: fix read of return value for callbacks returning an integer in Python 2.x (closes #125)