Phantom crossing in viable $f(R)$ theories