deprecated support of 0.18, and made detection of compatible decode
version more robust