Radiative capture of protons by B11 and the giant dipole resonance in C12