fix CheckLib bug to build under cygwin

This CheckLib bug: https://rt.cpan.org/Public/Bug/Display.html?id=91771 isn't yet fixed somehow in CheckLib so I propose fix it here at least.