distscript: make it work on Linux, OS X, and Solaris