Fix sample program to compile in modern rust