Fix #186: avoid iOS7 deprecation warnings
Catch undefined variables
Merge branch 'fix-io7-deprecation-warnings'