A possible way to define an effective cosmological constant in scalar-tensor cosmologies