Fixed the windows/cygwin export. Fixed a few export warnings.