Peralta homers in 9th to lift Tigers over ChiSox