darwin: return libusb error codes instead of kernel error codes and fix
a bug introduced in the last commit.