A measurement of the average lifetime of b-flavoured baryons