I put a sticker on the back of my Nexus 4. The phone no longer slides off of seemingly level surfaces. In fact it doesn't slide around much at all after the sticker.
If you don't like to have a sticker some appropriate colour duck/duct tape works perfectly.