Detect 0.20 API
Use 0.20 API if present
Merge pull request #1559 from cmouse/fix-issue-1464

Fix issue 1464