Fix error "Undefined index: SERVER_ADDR".
This is reproducible when we use php's built in server via 'php -S ...'.
Merge pull request #381 from darkgrin/server_addr_err

Fix error "Undefined index: SERVER_ADDR".