Use uname to get hostname rather than socket