Fix Python2.x support