Co-option of an endogenous retrovirus envelope for host defense in hominid ancestors