Fixed #12914 -- Use yaml faster C implementation when available

Thanks Beuc for the report and the initial patch.