Fixes Mac OSX 10.9 with libc++

Only switches to libstdc++ when you actually have CUDA and you enabled it.