Fix OS X compilation