Modified to use socket.gethostname since of os.uname is not available on
Windows.