Include explicit casts to prevent compiler warnings when building for iOS

These minor changes just add some explicit casts to suppress compiler warnings.
The only possible tricky one may be the cast to 'suseconds_t', since I don't know if the type name is like this on all supported platforms. The other casts should all be fine.