remove commas after last elements in objects to fix script parsing in ie7