fix xcode linker error
fix uninitialized memory bug (in loop.cpp)
[iOS] modify util::time::sleep to use external callback to sleep because call of nanosleep from C++ code causes hung for unknown reason.