Correct the windows and mac os x libs, prepare cmake for windows and os x compilation