Toyota beats Porsche in second WEC test session