When was the Mexican American war delcared?