Fixes for bug #136: setup.py with python 3

Please see bug #136.