Fixing version calculation on Firefox

Fixes 953