Characterizations of convexity via Hadamard's inequality