lexical to integer cmp, fixes #334