Added #defines for Py_TYPE/REFCNT for python2.4.