Fix building sample projects under Xcode 5 with modified library paths and C++ runtime library.