What war ultimately defined Madison's presidency?