Also improved corresponding cmake module to detect versions 5.x Based on patch by Christoph Grüninger.