cmake: only build testsuite in debug mode