Fix error "Undefined index: SERVER_ADDR".

This is reproducible when we use php's built in server via 'php -S ...'.

More info on this can be found in the following links:
http://stackoverflow.com/questions/5705082/is-serverserver-addr-safe-to-rely-on
http://php.net/manual/en/reserved.variables.server.php