hardware: Add an ifdef to disable id match check

Commit message considered too long by gerrit..
https://github.com/omnirom/android_hardware_libhardware
/commit/bc3fa1e026af5b16782011e18053fa6ede1f0fd5
is the original commit.
Change-Id: If79a941b54d83610638041440db907ae593b2e91