Add python3 compatibility.