Quintessence and gravitational waves