String theory compactifications with fluxes, and generalized geometry