You need to buy a FD connector (same as s5) and wire up those two wires to the correct places. Apparently you can't use the same two from the s4 plug, just one of them. B+ goes to the same place obviously. Also, check the mounting locations, you may need spacers/washers/longer bolt to line everything up.
When I did this on my s5 everything bolted in with zero issues (other than changing the pulley)
googled s4 to FD alt (took 5sec btw):
Another way to look at it... may be simpler