A splitting method for incompressible flows with variable density based on a pressure Poisson equation