fixing detect script to work in safari 5
Add missing semicolon, avoid var assignment
Merge pull request #205 from Financial-Times/safari-issue

fixing detect script to work in safari 5