Add python 3k compatibility