Remove reliance on inconsistent cmake feature testing