Normalization: avoid division by zero for constant feature dimensions

For constant features, there was a division by zero in case of normalizing X. Fixed in this PR.