Added --enable-shared to ffmpeg config
Added autodetection of libraries that needed to be copied