add 'libdir' support