Fixed compiler errors in sample code

Hi Mattt,

the example code in the Readme doesn't compile as it is now. This pull request contains the required fixes.

Please have a look. Thanks,
Claus