The distribution of exoplanet masses