fix compilation on py 3.x