A second-order projection method for variable-density flows