fix deprecation warnings under iOS6