waf: fixups for python2/python3 compat