Use stem of a library. Otherwise, Rust will use 'liblibXXX' as library name
Use iterative instead of recursive tree traversal