Electrostatics-based finite-size corrections for first-principles point defect calculations