get API_VERSION right no matter what (bug 1007226)