Velocity-dependent potentials in the shell model of 18O and 18F