Monte Carlo estimates of the mass gap of the O(2) and O(3) spin models in 1+1 dimensions