Add conditional compilation to avoid EXC_BAD_ACCESS when built with iOS 6.0 deployment target. fixes #1436