Buckling instability in amorphous carbon films