Gary Harkins has become St Mirren's first signing ahead of the new season after agreeing a two-year deal.