A second-order estimate for blow-up solutions of elliptic equations