Block reports better-than-expected earnings for second quarter