You will need a long cage mtb rear derailleur... would suggest an XT over an XTR as you will save a lot of cash and won't notice any difference in shifting performance.
The performance of any derailleur is affected by the hangar length and don't think any Shimano long cage rear d would have an issue with a few extra teeth.
The 12-36 is designed for 29r's and has it's own hub as a standard Shimano mtb cannot handle the torque load you get when you run those extra teeth... it is pretty much overkill for anything else and even then that cassette is really for extreme off road use.