Python 2 backwards compatibility.

Resolves #33