Python 2 fix (string.isidentifier did not yet exist.)