Fix compilation issues for examples