add support for osx mavericks and xcode5 on mountain lion

Should fix issue #20401

I tested it on both machines I have. Should work. But I would feel safer if somebody else could confirm it, before committing.

I hope I did not make any mistakes?