Fixed unit-tests errors on OS X Snow Leopard