Avila's homer gives Tigers 13-12 win over Red Sox