Hedge funds post July gain on stock market rally, still down for year