Unix cmake cleanup

This was rather minor stuff, review it if you like. Shouldn't affect windows, though