libhardware_legacy: Add ifdefs for non-QCOM hardware

Change-Id: Ic39f17d4626dc9970edf5c5466b3ccd6d16cbd3e