Dielectronic recombination of light Be-like and B-like ions