Fix substr returning undefined when unicode.semantics is on and input string is plain BMP
Fix substr returning undefined when unicode.semantics is on and input string is plain BMP

kvz/phpjs,kvz/phpjs,kvz/phpjs,kvz/phpjs