fix WKBReader
backport changes required for vtm-spatialite