Massachusetts companies shed 2,900 jobs in May