Better Mac and Windows support through cmake variables