NVR posts second-quarter declines