jpeg for iOS, minor fixes for ARC