The New York Times has apologized for an anti-Semitic cartoon that appeared in the newspaper's international edition.