PDA: Generalizable Detection of AI-Generated Images via Post-hoc Distribution Alignment