Fix some compilation problems caused by the compiler capability autodetector