Merging upstream hidapi changes.