Added Math.sign() function if unavailable (Chromium etc.)