Fix compile errors in examples