Fixed CMake handling of preprocessor definitions

There is an issue with how we are handling CMake preprocessor definitions like DYND_FFTW and DYND_ELWISE_MAX. They would work only for the initial compilation, but not when the headers were included afterwards.

This patch fixes that.