Porting form libusb to HIDAPI to enable usage on Darwin OSX

Reviewed-by: Mathieu Mitchell <mat128@gmail.com>