New York Times beats profit estimates on slower ad drop