Some API detection changes
Merge remote-tracking branch 'origin/master' into 1.7.2