Adds conditional libffi support

As translated from https://github.com/mfenniak/heroku-buildpack-python-libffi/.