Add support for Debian

Cherry-picked ce53b8f8e2ba5c7dd23755efc38fb460af7fc25b from Martijn de Gouw's
(https://github.com/martijndegouw) fork for Debian support.