Second order mobility analysis of mechanisms using closure equations