Steven MacLean scored the winner as St Mirren's relegation fight suffered another significant blow with a 1-0 defeat to St Johnstone.