Effect of demagnetization on magnetic resonance line shapes in bulk samples: Application to tungsten