Electron spin relaxation by nuclei in semiconductor quantum dots