There are no good reasons to check for an OS version anyway. Checking for the platform, ok. Not the version. That can be handled with feature detection.
I generally agree, but I'd amend that to "there are few good reasons". When an API is present but buggy, sometimes there's no good way around a version check. It can still be regarded as a last resort.
Sorry, but this doesn't even come close to working in the real world. If you're on the web, then this makes sense. However, on the metal, you need to know versions.