Duality for non-convex variational problems