Fixed #1297: Improve Unicode support in the identifier parser

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>