Build static libraries on demand

Preparing static library and linking to them would make things easier on systems which do not have package management. It would be just a matter of copying the executable on the target.