Sard's theorem for mappings in Hölder and Sobolev spaces