The effects of the initial mass function on Galactic chemical enrichment