Buffer gas cooling and mid-infrared spectroscopy of polyatomic molecules