Fix for new version of cmake

Our cmake macros break with the new version of cmake (3.1.0)