Detect iOS and iPad iOS versions properly.
Merge pull request #49 from ojarva/master

Detect iOS and iPad iOS versions properly.