Fix IE detection by copying the KO detection rutine. use do...while instead of while.
Merge pull request #480 from etishor/master

IE detection fix