cmake: use WITH_TESTS to enable tests