Fixes for Mac OS X

Added `mut` to the Mac and Windows version of `libname`, and fixed the cfgs on the non-Mac-and-Windows version.