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