A resistive extension for ideal magnetohydrodynamics