Fix building on Mac OS x

Change-Id: I2f6c0889bd2b6a597e5da5bf27de9f1292682b4f