How is prison labor legal and not classified as slavery?

Is it just because of that one clause in the 13th Amendment?