irkerd: Add Python-3-compatible string handling