Fix compile errors on clang/LLVM on iOS 8

Some modification to fix some warnings if using clang/LLVM compiler.