Update chr to be compatible with CPython