get API_VERSION right no matter what (bug 1007226)
Merge pull request #2029 from washort/1007226

get API_VERSION right no matter what (bug 1007226)