Python 3 compatibility.
Version bump: 0.5.1.