Fixed OS detection code.
Merge pull request #253 from Akythius/patch-1

Fixed OS detection code