Fix list versions bug on BSD.