Foxconn unit in advanced talks to buy stake in S&T