The elemental composition of the Sun - I. The intermediate mass elements Na to Ca