How to fix shadows being offset on sharp edges?

Using directional light shadows I get this bad offset. Is there any way to fix this? Using code from the wiki + PCFPOISSON

Try using PCF8. It does take somewhat more performance, but in my testing it provides significantly smoother edges to shadows.

There is no real way to fix this with shadows right now.
You can make it less obvious though, by reducing the shadows intensity, texturing your geometries and as @joehot200 said use a better edge filtering (PCFPOISSON usually give nice performance quality compromise)

Increase shadow map size.