cuda: fix crash if no cuda loaded.