When glaciers covered larger parts of Iceland, there was less volcanic activity in the country, a new study has found.