Fix frequent segfaults while using the gpu on Mac.

This should fix the plague of segfaults we get on Mac (most often due to explicitely linking against the wrong python) by making the linking implicit.

I managed to run the unit tests with the system python and EPD for cuda and tensor on the only mac I know that has an Nvidia GPU.