Elements with square roots in finite groups