Fix definition of isidentifier in Python 2