Implemented surrogate handling according to browsers and DOM Perl binding spec