D-magic labelings of the halved n-cube