Account for PHP 5.6 changes related to charsets