removes last comma in a javascript object because internet explorer told it to get off its lawn