Fix im_self access in Python 3.