Added '--static' option and support for COINDIR environment variable.