cmake: fixed some differences between handling Ice 3.4 and 3.5.
Merge branch 'maint'
Merge branch 'master' into next