refs #6013 use console only if executed from cli

The created issue makes absolutely sense I think as a command would be executed only in CLI mode anyway see https://github.com/piwik/piwik/blob/master/core/Plugin/ConsoleCommand.php#L30

What I am not sure is whether HHVM & co reports itself as CLI/CGI as well?