libhardware: Add ifdef around allocSize

 * Non-QC devices with prebuilt grallocs hate this.
Change-Id: I57ce7547e99ec0cf40c4f05f3742348dec4e2d9d