Check if php class Locale is loaded.

The php `function locale_accept_from_http()` is a procedural alias of [Locale::acceptFromHttp](http://php.net/manual/en/locale.acceptfromhttp.php). So it is safer to check if this class exists, to prevent the error "the function locale_accept_from_httpis not set".