Modifies the way the default locale is resolved to fix a problem with the latest revision of PHP 5.4.