LinkedIn Corp., the world’s largest online professional network, said Thursday after the markets closed that its second quarter loss widened sharply from last year, as higher costs and expenses more than offset a 33% increase in revenue. However, the company’s quarterly earnings per share, excluding items, came in well above analysts’ expectations as did its quarterly revenue.