Spin–spin interactions in defects in solids from mixed all-electron and pseudopotential first-principles calculations