fixing CLI check for servers using cgi-fcgi (PHP_SAPI is in those cases same for web and cli mode)