FLV library handling fixes.
(Mostly) courtesy of Erik.