python 3 compatibility

python 3 doesn't have unicode or long types, so those types aren't checked
against in python 3 anymore