Add initial hacks for eventual Xcode support

Just some late-night hacking without much thinking whether it makes
any sense and without any clear picture of what I am doing. Probably
useless. No promises I will ever continue on this.

Change-Id: Ie61925129bb678a17b30cb25a7882ccfe3a1de82