cmake: fixed some differences between handling Ice 3.4 and 3.5.