Electromagnetic polarizabilities of nucleons bound in 12C and 16O