UTF-8 strings handling for PHP 5.3: portable, performant and extended