And clean up other remaining code for older cmake versions.
c6e57553 accidentally moved the logic for adding the deprecation macro code for older cmake versions next to the logic for adding it with newer cmake versions, instead of dropping it.
@krop