Fix the build

Various build system fixes required for gst-plugins-bad to compile and link correctly