A Rademacher type theorem for Hamiltonians $H(x,p)$ and application to absolute minimizers