Diffuse X-ray scattering and the anomalous soft mode in NaNO3