Automatically set PATH and LD_LIBRARY_PATH

this is inspired by https://github.com/shunjikonishi/heroku-buildpack-ffmpeg/blob/master/bin/compile