Fix some ios 5.0 SDK compat issues