This is a reimplementation of the behavior of `sestatus` but is done in a manner that's compatible across multiple versions of libselinux.