surprisingly, patch --posix isn't very helpful
simplify library scans for various functions