Fix Frege/frege#71 ArrayIndexOutOfBoundsException on JArray.fold

Fixes `ArrayIndexOutOfBoundsException` on `JArray.fold` by not accessing the element at `array.length`.