better stdlib detection