fix defaulted length in copyTo() for primitive arrays