make the example code in the README runnable

Just a quick tweak to make the example code actually compile and run.