A defect relation for equidimensional holomorphic mappings between algebraic varieties