Changes to make shared library building and use work better with Cygwin