change cmake to work with apple