use System.arraycopy as GWT does not emulate clone() or Array.copyOf()