Intrinsic Dimension Estimation for Robust Detection of AI-Generated Texts