Applied toString fix for IE >= 9

in js