fix build on snow leopard