Generate import libs on cygwin, and fix naming to match conventions.
Patch from Ronald Landheer-Cieslak.