Fix Java<->JS array converters (#528).