The first patch by Patrick didn't work, because his "#ifdef HAVE_OSX" line would have required config.h.
Attach a file by drag & drop or click to upload