Just came across this question, looking for something else, here is my answer:
A general security principle to bear in mind: any data can be altered.
Now from a practical standpoint here is what happens: The further down you operate on the stack (transport, network, link...) the more difficult it gets to alter the data because the tools needed are more likely to be unavailable to you in the first place and require system modifications (e.g. you can recompile a linux kernel to mess up with ethernet/IP stack if you're interested).
Talking about HTTP, that's application layer and it becomes dead easy to do whatever you want. You'll find tons of tools which will allow you to generate any custom HTTP requests from very basic network tools (nc, telnet...) to more advanced ones (cUrl,Fiddler...).
So NO the mere presence of the x-requested-with header can't be considered as proper security.
While it may be useful for low security level situations it will definitely not stop an attacker willing to go past it. Remember the first principle in security: no system in impenetrable, it just has to be secure enough to make breaking attempts unworthy.