Fixed IE8 incompatibility directly inside the code to avoid including an
extra JS