powerdns: Define a application variable when not invoked from Shell

This allows to be run directly using mod_wsgi behind Apache.