MidCoast waterways given $1.3 million grant