Chemical shifts in molecular solids by machine learning