Added iOS5 support.
Merge pull request #3896 from stefanceriu/master

Added iOS5 support.