Use -Wcast-qual in cmake builds, not only autoconfo ones.