The X4 and X5 are perfectly compatible with each other; nothing else will need to be changed. The rear derailleur does not care how many gears you have. The link is post #3 is for a medium cage X5. If you can only find a long cage version, there will be no downside other than it being slightly heavier.