Ghost condensation and a consistent infrared modification of gravity