Finiteness of gravitational corrections to magnetic moments and supergravity embedding