Minor changes to cmake definitions

This hopefully fixes a few random crashes