Update cmake to work on linux and mac