Compactification with Flux on K3 and Tori