osx: fix build on snow leopard