Implement version sorting using POSIX.1-2008 only.