Fix linking errors.

* The ffmpeg one was fixed by re-ordering the linking libraries.
* The libtomcrypt one was fixed by setting a linker flag.