fix log10 to work in non-firefox browsers