Fix some issues building with --enable-qsv under OS X.