Fix build on Mac
Fix app delegate