Matrix theory and heterotic strings on tori