Fix Py3k syntax errors