more lib portability improvements, no strdup/cmp