fix code-generator example for OS X

Change-Id: Idabbb14777cae50854d8cf3db9894fdff6bc095a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>