fix missing constants when running with CGI mode