Elastic Photon Scattering and the E2 Strength Function in Carbon and Calcium