I was also in search of a fix. Check out this blog, it has everything you need and also downloadable material:
Outline effect (Part 3) – Parallelcube
Don’t forget to turn this on Project Settings > Rendering > Postprocessing > Custom-Depth Stencil Pass > Enabled With Stencil.
Otherwise, the material will not work!