Add hostname to details if not already present.