Dynamical properties of an antiferromagnet near the quantum critical point: Application to LaCuO2.5