Fix warning when using CLI (nut) 

Fix 
PHP Notice:  Undefined index: SERVER_NAME in .../app/classes/lib.php on line 745
When using CLI (nut)