Changed check whether run from cli or from web request

For some reasons on one of my hosts, the env var "$_SERVER['HTTP_HOST']" are set even if executed from cli.