Singularities and mobility of a class of 4-dof mechanisms