fixes to Mac CUDA detect