Fixed detection bug

Hopefully the issues are gone now. Because of this bug ffmpeg
complained about missing libraries in the end of the installation