Python3 compatibility shims

Just a couple small compatibility issues with stupid py3k