It's sloppy but it works. I thought I would share with you in case it comes in handy. I gave up trying to do it like the firmware did with "fanspeed" values and went with an "analogWrite" function. I defined FAN_PIN2 in the pins.h file and added the following code to the Marlin sketch:
#if FAN_PIN2 > -1
case 606: //M606 Fan2 On
if (code_seen('S')){
analogWrite(5, constrain(code_value(),0,255));} //D5 is fan_pin2
else {
analogWrite(5, 255);}
break;
case 607: //M607 Fan2 Off
analogWrite(5, 0);
break;
#endif //FAN_PIN2