Basic PY3 compatibility

See issue #6