minor changes to make the viewer compile and run on debian wheezy