Cmake and visual

autotools can be a real bother on windows, cmake is easy and simple and portable =)
Also fixed for visual studio