Bug 830500 - Implement JS_CharsToId. r=Waldo