Add iOS 6 support, see derpoliuk's fork