Remove final comma from JS array which confused older versions of IE