added OSX support
added *bsd support