Move $_SERVER out of lib code, called script knows best if it's CLI or
http request