Add missing include.
Fix warnings.
Update coin libraries.
Fix warnings.
Add includes for getpid.