Use syscall to get hostname

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>