Collective optical response of molecular aggregates