Origin of incommensurate modulations in the high-pressure phosphorus IV phase