Add workaround for logging crash under iOS 5. closes #1256