Fixes #286.

- Essentially, it is a Safari bug, and introduced code change is, ideally, not required. Not that the code change introduced is a workaround.
- Safari bug : https://bugs.webkit.org/show_bug.cgi?id=37514.
Merge pull request #287 from samyakbhuta/bug/286

Fixes the issue. Tested for regression in Chrome and FF on Mac. Working fine. Might wan't to check for other web runtimes.