build: minor fix for python3 compatibility.

refs #1302 note #12

Change-Id: I58679c7b5223adf15a9317c53b76e5e77882bf17