Python 3 compatibility for libstempo.toasim (at least for functionality exercised in demo)