perl: disable tests on Darwin, refactor stdenv.lib usage

There was a mysterious error, which I don't have resources to investigate:

Removing test lib/Net/hostent.t
sed: -i: No such file or directory