changes to enable build for iOS

I made a few #ifdef changes to get otapi and otlib to build for iOS, and also an architecture specific change related to strack traces on arm.