Don't override $wgServer if $_SERVER["SERVER_NAME"] is undefined.

It's always defined for page loads, but was causing a spurious notice
during run of commandline tools.

Change-Id: Ie451ade8008b8d4bf9637d935a87e632db05c04f
Merge "Don't override $wgServer if $_SERVER["SERVER_NAME"] is undefined." into production