Added a fix for Firefox 24

This is just a simple fix, there might be a more elegant solution.