I highly recommend a pet barrier from Travall. I bought one for our 2010 X5 and liked it so much, so I ordered another one for our 2012. Doesn't rattle or move, very solidly built.
Here is their product line-up http://dogguardsandcages.com/bmw/x5-2010-onwards
For pet barrier only, this is the product http://dogguardsandcages.com/dog-gua...?cPath=88_129&
We bought the divider as well http://dogguardsandcages.com/divider...?cPath=88_129&
, but haven't installed it yet.
If you buy the barrier and divider together, you'll get 10% off http://dogguardsandcages.com/bmw/x5-...?cPath=88_129&
I got their rubber liner as well, but don't really care for it, might sell it locally.
Here's a good review from someone who installed both the barrier and liner http://www.xbimmers.com/forums/showthread.php?t=773218
They are located in UK, so shipping is expensive and you have to pay a nominal import tax. However, if you are looking for a solid pet barrier, this is it and definitely worth the cost. Even without a pet (such as us), this item is IMO a good investment in safety in the case you end up in an accident preventing things from flying around. Plus you can load the trunk area in the X5 with more stuff, luggage etc.
P.S. Nice looking dog!