iOS6 support, compatibility fixes (CGGeometry)