Added support cmake support and initial Windows compatibility