Custom unix platform detection

Resolves issues introduced by commit
8ea0edef74f4246444d655efc9841ccaf222e13f