Minor py3k compatibility fixes

A couple of small fixes to allow Python 3 developers to use this library.