In a saucepan, add the sugar, water, and corn syrup and cook over medium heat until sugar is dissolved. Add the blueberries and thyme and cook over medium-low heat for 10 minutes. Let cool. Pour into glass jar or container with the thyme and berries and store in refrigerator. Store without the thyme for a subtler thyme flavor.
For the cocktail
In a cocktail shaker filled with ice, add the gin, blueberry-thyme syrup, and citrus juices and shake until cold. Strain into short rocks glass and garnish with Maine blueberries, a lemon peel curl, and fresh thyme sprig.