ie8 fix
Merge pull request #8 from andrewmackrodt/master

'switch' is a reserved keyword in ie8