perl: handles BR2_PREFER_STATIC_LIB