Add constructor for FactorVar.