Development of least-square-based two-dimensional finite-difference schemes and their application to simulate natural convection in a cavity