Add iOS build target, and fix a C++ edge case that caused errors with clang