Initial work for supporting python 3 (>= 3.3).