Here's how it's done: don't take the polygraph test.
Just don't apply for jobs that require you to take polygraph tests (law enforcement agencies, govt agencies, defense contractors, etc) and if are ever accused of a crime you didn't commit refuse to take the polygraph test and don't speak until you get an attorney.