split dfstat code to linux and darwin