Melt the butter in a pot set over medium heat. Add the onion and garlic and cook until tender, about 4 minutes Mix in the flour and cook 2 minutes more. While stirring, slowly pour in the stock. Mix in the squash, apple, thyme, cinnamon and nutmeg. Simmer 20 minutes, or until the squash and apples are very tender. Puree the soup in the pot with an immersion blender; or puree in a food processor or blender. Return the soup to a simmer. Mix in the cream (if using), salt and pepper and enjoy.