Math.sign only available in firefox