Make to_str() accept None as well as ffi.NULL to return as a negative value, and grab the version in a more compatible way.