Minor enh in examples
Some hacks to make it compile with gcc