[library] Provide backwards compatible code for SparseBooleanArray.clone()