getdomainname: Use the system function when possible.