scripts: better darwin detection