Fix the detection of where cuda is installed.
Merge pull request #1938 from nouiz/find_cuda

Fix the detection of where cuda is installed.