add support for mac os x and cygwin