South African miners threaten legal action against government