Add iOS6 compatibility