Fixing version calculation on Firefox

Fixes issue #953