added conditional logic (can be improved for other versions of bsd/solaris/*nix)
Merge pull request #10 from moradology/feature/non-gnu

added conditional logic (can be improved for other versions of bsd/solar...