Need help using Leonardo as a USB game controller

I have attached a joystick shield to a Leonardo and want to connect it to a PC and function like a USB device joystick. This has turned out to be more complicated than expected. My searches has yielded this site as best describing what I want to do
http://www.imaginaryindustries.com/blog/?p=80
But this example leads to compiler error for Joystick.setState(&joySt);
which don't surprise me. There are no such member for Joystick class.
It's not clear for me what more to do than using the two header and the example ino file.